
/**
 * Project Name:cats-core
 * File Name:UserInfo.java
 * Package Name:com.catsic.core.base
 * Date:2014年3月10日上午9:24:21
 * Copyright (c) 2014, oa.catsic.com All Rights Reserved.
 */
 
package com.catsic.core;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import org.springframework.security.core.GrantedAuthority;

import com.catsic.base.BaseInfo;
import com.catsic.core.entity.Resource;
import com.catsic.core.entity.Role;


/**
 * ClassName: UserInfo
 * Description: 登录用户信息类
 * date: 2014年3月10日 上午9:24:21
 * author: yangyd
 */
public class UserInfo extends BaseInfo{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1993802818112049969L;
	
	/**
	 * corganId:当前登录人所属的市级机构ID
	 */
	private String corganId;
	
	/**
	 * corganCode:当前登录人所属的市级机构Code
	 */
	private String corganCode;
	
	/**
	 * corganName:当前登录人所属的市级机构名称
	 */
	private String corganName;
	
	/**
	 * porganId:当前登录人所属的省级级机构ID
	 */
	private String porganId;
	
	/**
	 * porganCode:当前登录人所属的省级机构Code
	 */
	private String porganCode;
	
	/**
	 * porganName:当前登录人所属的省级机构名称
	 */
	private String porganName;
	
	/**
	 * roles:角色
	 */
	private List<Role> roles;
	
	/**
	 * resources:资源
	 */
	private List<Resource> resources = new ArrayList<Resource>();

	public UserInfo(String username,String password, Collection<? extends GrantedAuthority> authorities){
		super(username,password,authorities);
	}
		
	public UserInfo(String username, String password, boolean enabled,
			boolean accountNonExpired, boolean credentialsNonExpired,
			boolean accountNonLocked,
			Collection<? extends GrantedAuthority> authorities) {
		
		super(username, password, enabled, accountNonExpired, credentialsNonExpired,
				accountNonLocked, authorities);
		
	}
	
	public String getCorganId() {
		return corganId;
	}

	public void setCorganId(String corganId) {
		this.corganId = corganId;
	}

	public String getCorganCode() {
		return corganCode;
	}

	public void setCorganCode(String corganCode) {
		this.corganCode = corganCode;
	}

	public String getCorganName() {
		return corganName;
	}

	public void setCorganName(String corganName) {
		this.corganName = corganName;
	}

	public String getPorganId() {
		return porganId;
	}

	public void setPorganId(String porganId) {
		this.porganId = porganId;
	}

	public String getPorganCode() {
		return porganCode;
	}

	public void setPorganCode(String porganCode) {
		this.porganCode = porganCode;
	}

	public String getPorganName() {
		return porganName;
	}

	public void setPorganName(String porganName) {
		this.porganName = porganName;
	}

	public List<Role> getRoles() {
		return roles;
	}

	public void setRoles(List<Role> roles) {
		this.roles = roles;
	}

	public List<Resource> getResources() {
		return resources;
	}

	public void setResources(List<Resource> resources) {
		this.resources = resources;
	}
	
}
